#include "echo.h"
#include "Utils/tcpserver.h"
#include <functional>

EchoServer::EchoServer(tiny_muduo::EventLoop* loop, const tiny_muduo::Address& listen_addr)
    :loop_(loop),
    server_(loop, listen_addr)
{
    server_.SetConnectionCallback(std::bind(&EchoServer::ConnectionCallback, this, std::placeholders::_1, std::placeholders::_2));
    server_.SetMessageCallback(std::bind(&EchoServer::MessageCallback, this, std::placeholders::_1, std::placeholders::_2));
    server_.SetThreadNums(thread_nums);
}
